<!DOCTYPE html>
{% from "macros.html" import cmsmenu %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>cmsloginrecord</title>
    <style>
        h1{
            text-align: center;
        }
        #user_online{
            float: right;
            margin-right: 3px;
        }
        table{
            margin:auto;
        }
    </style>
    <link rel="stylesheet" href="{{ url_for ('static',filename='css/bootstrap.css')}}">
    <link rel="stylesheet" href="{{ url_for ('static',filename='css/flask.css')}}">
</head>
<body>
{{ cmsmenu(post_name,online) }}
<div>
    <table border="1" class="table" style="width:1000px">
    <tr>
        <td>用户名</td>
        <td>访问时间</td>
        <td>访问ip</td>
    </tr>
    {% for list in pagination %}
          <tr>
          <td>{{ list.username }}</td>
          <td>{{ list.time }}</td>
          <td>{{ list.ip }}</td>
          </tr>
    {% endfor %}
</table>
</div>

<div style="text-align: center">
{% if page>1 %}
    <a href="{{ url_for("cmsloginrecord") }}?page={{ page-1 }}">上一页</a>
{% endif %}
{% for i in range(post_times) %}
    <a href="{{ url_for("cmsloginrecord") }}?page={{ i+1 }}">{{ i+1 }}</a>
{% endfor %}
{% if page<10 %}
    <a href="{{ url_for("cmsloginrecord") }}?page={{page+1}}">下一页</a>
{% endif %}
</div>

</body>
</html>